/* 
 * File:   config.h
 * Author: Faraj
 *
 * Created on May 5, 2013, 4:24 PM
 */

#ifndef CONFIG_H
#define	CONFIG_H

#include <string>
#include <vector>
#include <fstream>
#include <map>
#include "common/log.h"
#include "common/str.h"
using namespace std;

namespace lib {

    class config {
    public:
        config(string filename);
        bool is_loaded();
        virtual ~config();
        void load();
        string lookup(string key);
        vector<string> keys(string key);

    private:
        map<string, string> _params;
        string _filename;
        bool _loaded;
        void _fetch();
    };
};
#endif	/* CONFIG_H */

